import { pageIprops, boardTitle } from '@/interface/cyl';

import _lodash from 'lodash';

// images
import carbg from '@/assets/cyl/car.png';
import robotbg from '@/assets/cyl/robot.png';
import dnabg from '@/assets/cyl/dna.png';
import fusebg from '@/assets/cyl/fuse.png';
import militarybg from '@/assets/cyl/military.png';
import moneybg from '@/assets/cyl/money.png';
import technologybg from '@/assets/cyl/technology.png';

// car
import car1 from '@/assets/cyl/car1.png';
import car2 from '@/assets/cyl/car2.png';
import car3 from '@/assets/cyl/car3.png';
// robot
import robot1 from '@/assets/cyl/robot1.png';
import robot2 from '@/assets/cyl/robot2.png';
import robot3 from '@/assets/cyl/robot3.png';
import robot4 from '@/assets/cyl/robot4.png';
import robot5 from '@/assets/cyl/robot5.png';
import robot6 from '@/assets/cyl/robot6.png';
import robot7 from '@/assets/cyl/robot7.png';
// dna
import dna1 from '@/assets/cyl/dna1.png';
import dna2 from '@/assets/cyl/dna2.png';
import dna3 from '@/assets/cyl/dna3.png';
import dna4 from '@/assets/cyl/dna4.png';
import dna5 from '@/assets/cyl/dna5.png';
import dna6 from '@/assets/cyl/dna6.png';
import dna7 from '@/assets/cyl/dna7.png';
import dna8 from '@/assets/cyl/dna8.png';
import dna9 from '@/assets/cyl/dna9.png';
// fuse
import fuse1 from '@/assets/cyl/fuse1.png';
// military
import military1 from '@/assets/cyl/military1.png';
// money
import money1 from '@/assets/cyl/money1.png';
// technology
import technology1 from '@/assets/cyl/technology1.png';
import technology2 from '@/assets/cyl/technology2.png';
import technology3 from '@/assets/cyl/technology3.png';
import technology4 from '@/assets/cyl/technology4.png';
import technology5 from '@/assets/cyl/technology5.png';
import technology6 from '@/assets/cyl/technology6.png';
import technology7 from '@/assets/cyl/technology7.png';
import technology8 from '@/assets/cyl/technology8.png';
import technology9 from '@/assets/cyl/technology9.png';
import technology10 from '@/assets/cyl/technology10.png';
import technology11 from '@/assets/cyl/technology11.png';
import technology12 from '@/assets/cyl/technology12.png';
import technology13 from '@/assets/cyl/technology13.png';
import technology14 from '@/assets/cyl/technology14.png';

// board icons
import icon1 from '@/assets/cyl/icon/icon1.png';
import icon2 from '@/assets/cyl/icon/icon2.png';
import icon3 from '@/assets/cyl/icon/icon3.png';
import icon4 from '@/assets/cyl/icon/icon4.png';
import icon5 from '@/assets/cyl/icon/icon5.png';

const boardConfig: {
  title: boardTitle;
  icon: string;
}[] = [
  {
    title: '工业总产值',
    icon: icon1,
  },
  {
    title: '营业收入',
    icon: icon2,
  },
  {
    title: '利润总额',
    icon: icon3,
  },
  {
    title: '能源消耗',
    icon: icon4,
  },
  {
    title: '用工人数',
    icon: icon5,
  },
];

const buildBoardIcon = (title: boardTitle) => {
  const item = _lodash.find(boardConfig, {
    title,
  });
  if (item) {
    return item.icon;
  }
  return icon1;
};

const car: pageIprops = {
  title: '高端汽车和新能源汽车',
  reportKey: '30',
  picture: carbg,
  diagram: [
    {
      title: '新能源汽车(纯电)',
      key: '2-NEA',
      icon: car1,
      x: 260,
      y: -100,
      color: '#72FA52',
    },
    {
      title: '智能网联汽车',
      key: '2-ICV',
      icon: car2,
      x: 15,
      y: 460,
      color: '#03D3FF',
    },
    {
      title: '智能网联道路',
      key: '2-ICR',
      icon: car3,
      x: 475,
      y: 460,
      color: '#FFB732',
    },
  ],
};

const robot: pageIprops = {
  title: '机器人和智能智造',
  reportKey: '31',
  picture: robotbg,
  diagram: [
    {
      title: '智慧工厂',
      key: '2-SF',
      icon: robot1,
      x: 260,
      y: -100,
      color: '#FFFE36',
    },
    {
      title: '智慧电能',
      key: '2-SE',
      icon: robot2,
      x: 20,
      y: 0,
      color: '#72FA52',
    },
    {
      title: '光制造',
      key: '2-GZZ',
      icon: robot3,
      x: -50,
      y: 240,
      color: '#D2FB7E',
    },
    {
      title: '医疗机器人',
      key: '2-MR',
      icon: robot4,
      x: 80,
      y: 490,
      color: '#F4B404',
    },
    {
      title: '智能机器人',
      key: '2-IR',
      icon: robot5,
      x: 440,
      y: 490,
      color: '#48A9FF',
    },
    {
      title: '3D打印',
      key: '2-3DP',
      icon: robot6,
      x: 570,
      y: 240,
      color: '#FA7FF3',
    },
    {
      title: '无人机',
      key: '2-UAV',
      icon: robot7,
      x: 500,
      y: 0,
      color: '#03D3FF',
    },
  ],
};

const dna: pageIprops = {
  title: '生物技术和大健康',
  reportKey: '32',
  picture: dnabg,
  diagram: [
    {
      title: '生物制药',
      key: '2-BP',
      icon: dna1,
      x: 260,
      y: -100,
      color: '#72FA52',
    },
    {
      title: '便携智能医疗设备',
      key: '2-CME',
      icon: dna2,
      x: 60,
      y: -30,
      color: '#03D3FF',
    },
    {
      title: '高端制剂',
      key: '2-HP',
      icon: dna3,
      x: -40,
      y: 160,
      color: '#03D3FF',
    },
    {
      title: '介入植入治疗器械',
      key: '2-ITT',
      icon: dna4,
      x: -10,
      y: 380,
      color: '#FFFD3E',
    },
    {
      title: '医学影像设备',
      key: '2-MIT',
      icon: dna5,
      x: 160,
      y: 520,
      color: '#FFBA00',
    },
    {
      title: '基因检测和体外诊断',
      key: '2-DNA',
      icon: dna6,
      x: 380,
      y: 520,
      color: '#FF81F5',
    },
    {
      title: '基因细胞治疗',
      key: '2-GCT',
      icon: dna7,
      x: 550,
      y: 370,
      color: '#79BFFF',
    },
    {
      title: '干细胞',
      key: '2-SC',
      icon: dna8,
      x: 560,
      y: 130,
      color: '#D6FF7E',
    },
    {
      title: '蛋白药',
      key: '2-PR',
      icon: dna9,
      x: 450,
      y: -30,
      color: '#72FA52',
    },
  ],
};

const fuse: pageIprops = {
  title: '科文融合产业',
  reportKey: '33',
  picture: fusebg,
  diagram: [
    {
      title: '视听(游戏电竞)',
      key: '2-AV',
      icon: fuse1,
      x: 450,
      y: -30,
      color: '#03D3FF',
    },
  ],
};

const military: pageIprops = {
  title: '军民融合产业',
  reportKey: '34',
  picture: militarybg,
  diagram: [
    {
      title: '航天航空',
      key: '2-AS',
      icon: military1,
      x: 450,
      y: -30,
      color: '#03D3FF',
    },
  ],
};

const money: pageIprops = {
  title: '金融产业',
  reportKey: '35',
  picture: moneybg,
  diagram: [
    {
      title: '金融服务',
      key: '1-FIN',
      icon: money1,
      x: 450,
      y: -30,
      color: '#FAFF46',
    },
  ],
};

const technology: pageIprops = {
  title: '新一代信息技术',
  reportKey: '36',
  picture: technologybg,
  diagram: [
    {
      title: '集成电路',
      key: '2-IC',
      icon: technology1,
      x: 260,
      y: -100,
      color: '#72FA52',
    },
    {
      title: '信创',
      key: '2-TS',
      icon: technology2,
      x: 130,
      y: -80,
      color: '#5F9BFF',
    },
    {
      title: '虚拟和增强现实系统',
      key: '2-AR',
      icon: technology3,
      x: 0,
      y: 0,
      color: '#FFFD3E',
    },
    {
      title: '石墨烯材料',
      key: '2-GM',
      icon: technology4,
      x: -50,
      y: 130,
      color: '#5F9BFF',
    },
    {
      title: '新型显示',
      key: '2-OLE',
      icon: technology5,
      x: -50,
      y: 290,
      color: '#FFBA00',
    },
    {
      title: '智能终端',
      key: '2-ITC',
      icon: technology6,
      x: 10,
      y: 440,
      color: '#FFFD3E',
    },
    {
      title: '区块链',
      key: '2-BT',
      icon: technology7,
      x: 130,
      y: 510,
      color: '#FF81F5',
    },
    {
      title: '大数据',
      key: '2-BD',
      icon: technology8,
      x: 260,
      y: 540,
      color: '#FFBA00',
    },
    {
      title: '人工智能',
      key: '2-AI',
      icon: technology9,
      x: 390,
      y: 510,
      color: '#03D3FF',
    },
    {
      title: '物联网',
      key: '2-IOT',
      icon: technology10,
      x: 510,
      y: 440,
      color: '#FFFD3E',
    },
    {
      title: '5G',
      key: '2-5G',
      icon: technology11,
      x: 570,
      y: 290,
      color: '#FFFD3E',
    },
    {
      title: '天地一体化信息网络',
      key: '2-CIST',
      icon: technology12,
      x: 570,
      y: 130,
      color: '#72FA52',
    },
    {
      title: '未来网络',
      key: '2-FN',
      icon: technology13,
      x: 520,
      y: 0,
      color: '#FF81F5',
    },
    {
      title: '智能传感器',
      key: '2-IS',
      icon: technology14,
      x: 390,
      y: -80,
      color: '#03D3FF',
    },
  ],
};

const config = {
  car,
  robot,
  dna,
  money,
  military,
  fuse,
  technology,
};

export default config;
export { buildBoardIcon };
